/*
	sip_debug.c

*/
#include "sip_debug.h"

static int g_level =5;
static FILE *g_log_file=0;

void elk_log(int level, char *msg)
{
    if(level < g_level)
    {
        fprintf(g_log_file, "%s\n", msg);
        fflush(g_log_file);
    }
}
void elk_log_init()
{
    g_log_file=fopen("elksip.log","w");
}
void elk_log_close()
{
    if(g_log_file!=0)
        close(g_log_file);
}
